<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>bn::fixed_point_t class | Butano Docs</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
  <link rel="icon" href="favicon-dark.png" type="image/png" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="theme-color" content="#22272e" />
</head>
<body>
<header><nav id="navigation">
  <div class="m-container">
    <div class="m-row">
      <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
        <a href="https://github.com/GValiente/butano">Butano</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">Docs</a>
      </span>
      <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
          <path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
        </svg></a>
        <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
        <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
      </div>
      <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
        <div class="m-row">
          <ol class="m-col-t-6 m-col-m-none">
            <li><a href="pages.html">Pages</a></li>
            <li><a href="modules.html">Modules</a></li>
          </ol>
          <ol class="m-col-t-6 m-col-m-none" start="3">
            <li><a href="namespaces.html">Namespaces</a></li>
            <li><a href="annotated.html">Classes</a></li>
            <li><a href="files.html">Files</a></li>
            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
              <use href="#m-doc-search-icon-path" />
            </svg></a></li>
          </ol>
        </div>
      </div>
    </div>
  </div>
</nav></header>
<main><article>
  <div class="m-container m-container-inflatable">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <h1>
          <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="bn__fixed__point_8h.html">&lt;bn_fixed_point.h&gt;</a></div>
          <div class="m-doc-template">template&lt;int Precision&gt;</div>
          <span class="m-breadcrumb"><a href="namespacebn.html">bn</a>::<wbr/></span>fixed_point_t <span class="m-thin">class</span>
        </h1>
        <p>Defines a two-dimensional point using fixed point precision.</p>
        <nav class="m-block m-default">
          <h3>Contents</h3>
          <ul>
            <li>
              Reference
              <ul>
                <li><a href="#typeless-methods">Constructors, destructors, conversion operators</a></li>
                <li><a href="#pub-methods">Public functions</a></li>
                <li><a href="#friends">Friends</a></li>
              </ul>
            </li>
          </ul>
        </nav>
        <section id="typeless-methods">
          <h2><a href="#typeless-methods">Constructors, destructors, conversion operators</a></h2>
          <dl class="m-doc">
            <dt id="a038ce20fa279c1797ec9654b20abe76a">
              <span class="m-doc-wrap-bumper"><a href="#a038ce20fa279c1797ec9654b20abe76a" class="m-doc-self">fixed_point_t</a>(</span><span class="m-doc-wrap">) <span class="m-label m-flat m-info">defaulted</span> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Default constructor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a href="#a7d65a2f3c38598839d1e22b30c04989f" class="m-doc">fixed_point_t</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; x,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; y) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Constructor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a href="#a23e076f1a16fd35ea356795cf3fc09f0" class="m-doc">fixed_point_t</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1point.html" class="m-doc">point</a>&amp; point) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Constructor.</dd>
          </dl>
        </section>
        <section id="pub-methods">
          <h2><a href="#pub-methods">Public functions</a></h2>
          <dl class="m-doc">
            <dt id="a1b45dcc24e682c7e8baaacf2adabc3cc">
              <span class="m-doc-wrap-bumper">auto <a href="#a1b45dcc24e682c7e8baaacf2adabc3cc" class="m-doc-self">x</a>(</span><span class="m-doc-wrap">) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the horizontal coordinate.</dd>
            <dt id="af10ac8b9b8c6f5cff747ff94aa22054e">
              <span class="m-doc-wrap-bumper">void <a href="#af10ac8b9b8c6f5cff747ff94aa22054e" class="m-doc-self">set_x</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; x) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Sets the horizontal coordinate.</dd>
            <dt id="af0d6aa91adaa02c1282926cce06f75e8">
              <span class="m-doc-wrap-bumper">auto <a href="#af0d6aa91adaa02c1282926cce06f75e8" class="m-doc-self">y</a>(</span><span class="m-doc-wrap">) const -&gt; <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the vertical coordinate.</dd>
            <dt id="a66a30a81ed05a7064021cbcaacf0c41b">
              <span class="m-doc-wrap-bumper">void <a href="#a66a30a81ed05a7064021cbcaacf0c41b" class="m-doc-self">set_y</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; y) <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Sets the vertical coordinate.</dd>
            <dt id="a54de0af569c36415dac209dd906a39ec">
              <span class="m-doc-wrap-bumper">auto <a href="#a54de0af569c36415dac209dd906a39ec" class="m-doc-self">multiplication</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this point by the given integer value.</dd>
            <dt id="a34e2a2a82fd1d3cb4640228845ede14d">
              <span class="m-doc-wrap-bumper">auto <a href="#a34e2a2a82fd1d3cb4640228845ede14d" class="m-doc-self">multiplication</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this point by the given fixed point value, using half precision to try to avoid overflow.</dd>
            <dt id="ae24904550f31be0e6aee7b05fd8c9297">
              <span class="m-doc-wrap-bumper">auto <a href="#ae24904550f31be0e6aee7b05fd8c9297" class="m-doc-self">safe_multiplication</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this point by the given integer value.</dd>
            <dt id="ad366ed326dbb10523a2ebb230a276196">
              <span class="m-doc-wrap-bumper">auto <a href="#ad366ed326dbb10523a2ebb230a276196" class="m-doc-self">safe_multiplication</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this point by the given fixed point value, casting them to int64_t to try to avoid overflow.</dd>
            <dt id="a082533f0e591c8f6692a3d248d059e23">
              <span class="m-doc-wrap-bumper">auto <a href="#a082533f0e591c8f6692a3d248d059e23" class="m-doc-self">unsafe_multiplication</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this point by the given integer value.</dd>
            <dt id="a69874d512d93646cb94e4827c4ef2b34">
              <span class="m-doc-wrap-bumper">auto <a href="#a69874d512d93646cb94e4827c4ef2b34" class="m-doc-self">unsafe_multiplication</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the multiplication of this point by the given fixed point value without trying to avoid overflow.</dd>
            <dt id="a0f2d8380fb6953329d612fbbb760bee2">
              <span class="m-doc-wrap-bumper">auto <a href="#a0f2d8380fb6953329d612fbbb760bee2" class="m-doc-self">division</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this point by the given integer value.</dd>
            <dt id="a1053f1465dbc3de439649ebdb5637f47">
              <span class="m-doc-wrap-bumper">auto <a href="#a1053f1465dbc3de439649ebdb5637f47" class="m-doc-self">division</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this point by the given fixed point value, using half precision to try to avoid overflow.</dd>
            <dt id="a2fdd335803a7071cd5e4a65966cbf364">
              <span class="m-doc-wrap-bumper">auto <a href="#a2fdd335803a7071cd5e4a65966cbf364" class="m-doc-self">safe_division</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given integer value.</dd>
            <dt id="ae444471cd404e2c3f05473e610c89de6">
              <span class="m-doc-wrap-bumper">auto <a href="#ae444471cd404e2c3f05473e610c89de6" class="m-doc-self">safe_division</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this point by the given fixed point value, casting them to int64_t to try to avoid overflow.</dd>
            <dt id="a4431a3d78295e4d1d8ce325aa73ea331">
              <span class="m-doc-wrap-bumper">auto <a href="#a4431a3d78295e4d1d8ce325aa73ea331" class="m-doc-self">unsafe_division</a>(</span><span class="m-doc-wrap">int value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this value by the given integer value.</dd>
            <dt id="a27965bc5cf6135f3ee8c92636f729b10">
              <span class="m-doc-wrap-bumper">auto <a href="#a27965bc5cf6135f3ee8c92636f729b10" class="m-doc-self">unsafe_division</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the division of this point by the given fixed point value without trying to avoid overflow.</dd>
            <dt id="a0bf39b80c7bc2d0cdb7fd9b18ef671c7">
              <span class="m-doc-wrap-bumper">auto <a href="#a0bf39b80c7bc2d0cdb7fd9b18ef671c7" class="m-doc-self">operator-</a>(</span><span class="m-doc-wrap">) const -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> that is formed by changing the sign of both coordinates.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#ad51b511e8dc3033658375ffdab714a95" class="m-doc">operator+=</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; other) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Adds the given <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> to this one.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a71dca750d84360ff3e133091fcdd8c50" class="m-doc">operator-=</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; other) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Subtracts the given <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> to this one.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a080a05bd2cfd39c42d728ea036572028" class="m-doc">operator*=</a>(</span><span class="m-doc-wrap">int value) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Multiplies both coordinates by the given factor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#aa854185f09b104a167576698eee1e3e0" class="m-doc">operator*=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Multiplies both coordinates by the given factor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a2f0f93f2b1af05a29ed95a7174f58a22" class="m-doc">operator/=</a>(</span><span class="m-doc-wrap">int value) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Divides both coordinates by the given divisor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a216c6498ad1656d55e596ce5c367d958" class="m-doc">operator/=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Divides both coordinates by the given divisor.</dd>
          </dl>
        </section>
        <section id="friends">
          <h2><a href="#friends">Friends</a></h2>
          <dl class="m-doc">
            <dt id="a6dadf2ed2362fd7159755f4a5a60b71d">
              <span class="m-doc-wrap-bumper">auto <a href="#a6dadf2ed2362fd7159755f4a5a60b71d" class="m-doc-self">operator+</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; a,
              const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; b) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns the sum of a and b.</dd>
            <dt id="ab3c8720358e665001caf88472069f14d">
              <span class="m-doc-wrap-bumper">auto <a href="#ab3c8720358e665001caf88472069f14d" class="m-doc-self">operator-</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; a,
              const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; b) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns b subtracted from a.</dd>
            <dt id="a14b69547213ae6a5560fa2fd1bdb1b71">
              <span class="m-doc-wrap-bumper">auto <a href="#a14b69547213ae6a5560fa2fd1bdb1b71" class="m-doc-self">operator*</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; a,
              int b) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a multiplied by b.</dd>
            <dt id="a0dfaac618fd8636d5b54946bf23bf774">
              <span class="m-doc-wrap-bumper">auto <a href="#a0dfaac618fd8636d5b54946bf23bf774" class="m-doc-self">operator*</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; b) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a multiplied by b.</dd>
            <dt id="acae3badbfbe3c4cc57222c1f0bee479a">
              <span class="m-doc-wrap-bumper">auto <a href="#acae3badbfbe3c4cc57222c1f0bee479a" class="m-doc-self">operator/</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; a,
              int b) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a divided by b.</dd>
            <dt id="aede6b736094074a3fa054c011857454f">
              <span class="m-doc-wrap-bumper">auto <a href="#aede6b736094074a3fa054c011857454f" class="m-doc-self">operator/</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; a,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; b) -&gt; <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Returns a divided by b.</dd>
            <dt id="acf789c8df18922818b03937fa46fbe07">
              <span class="m-doc-wrap-bumper">auto <a href="#acf789c8df18922818b03937fa46fbe07" class="m-doc-self">operator==</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; a,
              const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; b) -&gt; bool <span class="m-label m-flat m-info">defaulted</span> <span class="m-label m-flat m-primary">constexpr</span></span>
            </dt>
            <dd>Default equal operator.</dd>
          </dl>
        </section>
        <section>
          <h2>Function documentation</h2>
          <section class="m-doc-details" id="a7d65a2f3c38598839d1e22b30c04989f"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"> bn::<wbr />fixed_point_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a7d65a2f3c38598839d1e22b30c04989f" class="m-doc-self">fixed_point_t</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; x,
              <a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; y) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">x</td>
                  <td>Horizontal coordinate.</td>
                </tr>
                <tr>
                  <td>y</td>
                  <td>Vertical coordinate.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="a23e076f1a16fd35ea356795cf3fc09f0"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"> bn::<wbr />fixed_point_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a23e076f1a16fd35ea356795cf3fc09f0" class="m-doc-self">fixed_point_t</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1point.html" class="m-doc">point</a>&amp; point) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">point</td>
                  <td>Integer point.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="ad51b511e8dc3033658375ffdab714a95"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; bn::<wbr />fixed_point_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ad51b511e8dc3033658375ffdab714a95" class="m-doc-self">operator+=</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; other) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Adds the given <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> to this one.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">other</td>
                  <td><a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> to add.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a71dca750d84360ff3e133091fcdd8c50"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; bn::<wbr />fixed_point_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a71dca750d84360ff3e133091fcdd8c50" class="m-doc-self">operator-=</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; other) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Subtracts the given <a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> to this one.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">other</td>
                  <td><a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a> to subtract.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a080a05bd2cfd39c42d728ea036572028"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; bn::<wbr />fixed_point_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a080a05bd2cfd39c42d728ea036572028" class="m-doc-self">operator*=</a>(</span><span class="m-doc-wrap">int value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Multiplies both coordinates by the given factor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Integer multiplication factor.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="aa854185f09b104a167576698eee1e3e0"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; bn::<wbr />fixed_point_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#aa854185f09b104a167576698eee1e3e0" class="m-doc-self">operator*=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Multiplies both coordinates by the given factor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Fixed point multiplication factor.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a2f0f93f2b1af05a29ed95a7174f58a22"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; bn::<wbr />fixed_point_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a2f0f93f2b1af05a29ed95a7174f58a22" class="m-doc-self">operator/=</a>(</span><span class="m-doc-wrap">int value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Divides both coordinates by the given divisor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Valid integer divisor (!= 0).</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a216c6498ad1656d55e596ce5c367d958"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int Precision&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1fixed__point__t.html" class="m-doc">fixed_<wbr />point_<wbr />t</a>&amp; bn::<wbr />fixed_point_t&lt;Precision&gt;::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a216c6498ad1656d55e596ce5c367d958" class="m-doc-self">operator/=</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1fixed__t.html" class="m-doc">fixed_<wbr />t</a>&lt;Precision&gt; value) <span class="m-label m-primary">constexpr</span></span></span>
            </h3>
            <p>Divides both coordinates by the given divisor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">value</td>
                  <td>Valid fixed point divisor (!= 0).</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td>Reference to this.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
        </section>
      </div>
    </div>
  </div>
</article></main>
<div class="m-doc-search" id="search">
  <a href="#!" onclick="return hideSearch()"></a>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-m-8 m-push-m-2">
        <div class="m-doc-search-header m-text m-small">
          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
          <div id="search-symbolcount">&hellip;</div>
        </div>
        <div class="m-doc-search-content">
          <form>
            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
          </form>
          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
          <div id="search-help" class="m-text m-dim m-text-center">
            <p class="m-noindent">Search for symbols, directories, files, pages or
            modules. You can omit any prefix from the symbol or file path; adding a
            <code>:</code> or <code>/</code> suffix lists all members of given symbol or
            directory.</p>
            <p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
            / <span class="m-label m-dim">&uarr;</span> to navigate through the list,
            <span class="m-label m-dim">Enter</span> to go.
            <span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
            copy a link to the result using <span class="m-label m-dim">⌘</span>
            <span class="m-label m-dim">L</span> while <span class="m-label m-dim">⌘</span>
            <span class="m-label m-dim">M</span> produces a Markdown link.</p>
          </div>
          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
          <ul id="search-results"></ul>
        </div>
      </div>
    </div>
  </div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <p>Butano Docs. Created with <a href="https://doxygen.org/">Doxygen</a> 1.14.0 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
      </div>
    </div>
  </div>
</nav></footer>
</body>
</html>
